<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<%@ include file="/WEB-INF/jsp/inc/taglibs.jsp"%>
		<%@ include file="/WEB-INF/jsp/inc/meta.jsp"%>
		<script type="text/javascript">
	function checkAll(val) {
		//alert(val);
		if (val)
			$('input[name=ids]').each(function() {
				$(this).attr('checked', true);
			})
		else
			$('input[name=ids]').each(function() {
				$(this).attr('checked', false);
			})
	}
	function gotopage() {
		var page = $('#topage').val();
		var url = '${approot}/admin/prepaid/list/page/' + page;
		// alert(url);
		window.location.href = url;
	}
	//清空恢复表单原始数据
	function formreset() {
		$("input[type=text]").val("");
		$("#type").val("0");
	}

	//批量删除
	function delete_batch() {
		var count = 0;
		$('input[name=ids]:checked').each(function() {
			count = count + 1;
		})
		if (count == 0) {
			alert("请至少选中一条记录");
			return false;
		} else {
			var ids = "";
			$("input[name='ids']:checked").each(function() {
				ids = ids + $(this).val() + "_";
			})
			var url = '${approot}/admin/prepaid/delete_batch/' + ids;
			//alert(url);
			//window.location.href=url;

		}

	}

//	function to_pay_money(id){
//		window.open('${approot}/admin/excerpt/to_pay_money/'+id,'_blank','height=600,width=800,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no,left=200,top=200');
//	}
</script>
	</head>
	<body style="background: #E8F5FE; padding: 15px 18px;" class="scroll_r">
		<form method="post"
			action="${approot}/admin/statistic/excerpt_statistic"
			id="excerptStatisticBean">
			<table border="0" cellpadding="0" cellspacing="1" width="92%"
				align="center" id="add_tab">
				<tr>

					<td width="500" colspan="3"></td>
					<th>
						售气年份：
					</th>
					<td>
					<input id="year"  value="${excerptStatisticBean.year}" name="year" class="Wdate" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy',alwaysUseStartDate:true})"/>
					</td>
					
				</tr>
				<tr>
					<td colspan="6" style="text-align: center">
						<input type="submit" class="but" value="开始查询">
						<input type="button" class="but" onclick="formreset()"
							value="重置条件">
					</td>
				</tr>
			</table>
		</form>
		<c:choose>
			<c:when test="${fn:length(esList)<1}">
				<div align="center">
					<font color='red'>对不起,暂时没有找到符合条件的数据!</font>
				</div>
			</c:when>
			<c:otherwise>
				<table border="0" cellpadding="" cellspacing="1" align="center"
					width="92%" id="web_tab">
					<tr>
						<th>
							明细
						</th>
						<th>
							一月
						</th>
						<th>
							二月
						</th>
						<th>
							三月
						</th>
						<th>
							四月
						</th>
						<th>
							五月
						</th>
						<th>
							六月
						</th>
						<th>
							七月
						</th>
						<th>
							八月
						</th>
						<th>
							九月
						</th>
						<th>
							十月
						</th>
						<th>
							十一月
						</th>
						<th>
							十二月
						</th>
						<th>
							合计
						</th>
					</tr>
					<c:forEach var="excerptStatistic" items="${esList}" varStatus="s">
						<tr>
							<td>
								${fn:substring(excerptStatistic.mingxi,0,2) }
								<c:if test="${fn:substring(excerptStatistic.mingxi,2,3) == 0}">户内</c:if>
								<c:if test="${fn:substring(excerptStatistic.mingxi,2,3) == 1}">户外</c:if>
							</td>
							<td>
								${excerptStatistic.yi}
							</td>
							<td>
								${excerptStatistic.er}
							</td>
							<td>
								${excerptStatistic.san}
							</td>
							<td>
								${excerptStatistic.si}
							</td>
							<td>
								${excerptStatistic.wu}
							</td>
							<td>
								${excerptStatistic.liu}
							</td>
							<td>
								${excerptStatistic.qi}
							</td>
							<td>
								${excerptStatistic.ba}
							</td>
							<td>
								${excerptStatistic.jiu}
							</td>
							<td>
								${excerptStatistic.shi}
							</td>
							<td>
								${excerptStatistic.shiyi}
							</td>
							<td>
								${excerptStatistic.shier}
							</td>
							<td>
								${fn:substring((excerptStatistic.yi+excerptStatistic.er+excerptStatistic.san+excerptStatistic.si+excerptStatistic.wu+excerptStatistic.liu+excerptStatistic.qi+excerptStatistic.ba+excerptStatistic.jiu+excerptStatistic.shi+excerptStatistic.shiyi+excerptStatistic.shier),0,fn:indexOf(excerptStatistic.yi+excerptStatistic.er+excerptStatistic.san+excerptStatistic.si+excerptStatistic.wu+excerptStatistic.liu+excerptStatistic.qi+excerptStatistic.ba+excerptStatistic.jiu+excerptStatistic.shi+excerptStatistic.shiyi+excerptStatistic.shier,".")+3)}
							</td>
						</tr>
					</c:forEach>
				</table>
			</c:otherwise>
		</c:choose>
	</body>
</html>
